# $Id: PKGBUILD 180803 2013-03-26 11:49:32Z foutrelis $
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Hokum <hokum_at_mail_dot_ru>

pkgname=gptfdisk
pkgver=0.8.6
pkgrel=2
pkgdesc="A text-mode partitioning tool that works on Globally Unique Identifier (GUID) Partition Table (GPT) disks"
arch=('i686' 'x86_64')
url="http://www.rodsbooks.com/gdisk/"
license=('GPL2')
depends=('gcc-libs' 'util-linux' 'popt' 'icu')
provides=("gdisk=$pkgver")
conflicts=('gdisk')
replaces=('gdisk')
source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('4579cd54842459699970e24720dda7fb0aa217027818623089c321bc62a647b2')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  # Get rid of annoying debug message (have sent email to upstream author)
  sed -i '/Entering GPTPart::SetName/d' gptpart.cc

  make
}

package () {
  cd "$srcdir/$pkgname-$pkgver"

  install -d "$pkgdir"/usr/{bin,share/{doc/gdisk,man/man8}}
  install -t "$pkgdir/usr/bin" {,c,s}gdisk fixparts
  install -m644 -t "$pkgdir/usr/share/man/man8" {{,c,s}gdisk,fixparts}.8
  install -m644 -t "$pkgdir/usr/share/doc/gdisk" README NEWS
}

# vim:set ts=2 sw=2 et:
